<template>  
    <div class="bg_wap_frame">
        <hometop :word='hotWordName'></hometop>
        <div class="scroll_area heightAuto">
            <adSwiper :adSwiper='setGetDvertInfoData'></adSwiper>
        </div>
    </div>
</template>
<script>
import { mapActions, mapState } from 'vuex'
import hometop from './hometop.vue'
import adSwiper from '../../ad/default/adSwiper.vue'
import './css/home.scss'
export default {
    computed: {
        ...mapState({
            setGetDvertInfoData: function(state) { 
                // 之前这里写成state.ad.setGetDvertInfo                  
                return state.ad.getDvertInfo 
            },
            hotWordName: function(state) {
                return state.home.hotWord
            }

        })
    },
    mounted() {
        this.getAd()
        this.getWord()
    },
    methods: {
        ...mapActions({
            getAd: 'ad/getAd',
            getWord: 'home/getHotword'
        })
    },
    components: {
        hometop,
        adSwiper
    }
}
</script>
</style>
